﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace _18miljard.UI.Controls
{
	public partial class TopControl : BaseUserControl
	{
		protected override void PreLoadHandler(object sender, EventArgs e)
		{
			TopBanner topBanner = DataCache.TopBanner;

			if (topBanner.Href == "none")
			{
				this.TopBanner.Visible = false;
			}
			else
			{
				this.hplTopAd.NavigateUrl = topBanner.Href;
				this.hplTopAd.ImageUrl = topBanner.Url;
				this.hplTopAd.Text = topBanner.Alt;
			}
		}
	}
}